package com.piece.module.flowable.model;

import com.piece.core.framework.annotation.translate.DicTranslate;
import com.piece.core.framework.support.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@NoArgsConstructor
@Table(name = "wf_form")
@ApiModel(value = "流程实例关联表:wf_form")
public class WfForm extends BaseEntity implements Serializable {

    @Id
    @Column(name = "form_id", length = 11)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "表单主键")
    private Long formId;

    @Column(name = "form_name", length = 64)
    @ApiModelProperty(value = "表单名称")
    private String formName;

    @Column(name = "content")
    @ApiModelProperty(value = "表单内容")
    private String content;

    @Column(name = "remark")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Column(name = "status", length = 1)
    @ApiModelProperty(value = "状态", notes = "0=正常, 1=删除, 2=停用")
    private String status;

    @Transient
    @ApiModelProperty(value = "状态名称")
    @DicTranslate(source = "status", dicType = "sys_normal_disable")
    private String statusName;
}
